package com.zhouyu.examplerocketmq.consumer;

import lombok.extern.log4j.Log4j2;
import org.apache.rocketmq.spring.annotation.RocketMQMessageListener;
import org.apache.rocketmq.spring.core.RocketMQListener;
import org.springframework.stereotype.Service;

/**
 * @Description:消息消费者
 */
@Log4j2
@Service
@RocketMQMessageListener(topic = "topic-1", consumerGroup = "consuGroup")
public class MessageConsumer1 implements RocketMQListener<String> {
    @Override
    public void onMessage(String s) {
        MessageConsumer1.log.info("收到消息1：{}", s);
    }
}
